package com.mooo;

import java.util.Scanner;

public class a12 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个蔬菜");
        String name1 = sc.next();
        System.out.println("输入该蔬菜的价格（元/斤）");
        double price1 = sc.nextDouble();
        System.out.println("请输入一个蔬菜");
        String name2 = sc.next();
        System.out.println("输入该蔬菜的价格（元/斤）");
        double price2 = sc.nextDouble();
        System.out.println("请输入一个蔬菜");
        String name3 = sc.next();
        System.out.println("输入该蔬菜的价格（元/斤）");
        double price3 = sc.nextDouble();
        int pri1 = (int) (price1 + 0.5);
        int pri2 = (int) (price2 + 0.5);
        int pri3 = (int) (price3 + 0.5);
        int average = (pri1 + pri2 + pri3) / 3;
        System.out.println("平均价位是" + average + "元");
    }
}
